//
//  UploadFileResponse.swift
//  SwiftBase
//
//  Created by 郭艳波 on 2018/3/9.
//  Copyright © 2018年 郭艳波. All rights reserved.
//

import UIKit
import ObjectMapper

class UploadFileResponse: NSObject, Mappable {
    var code: Int!
    var data: UploadFileDataResponse!
    
    required init?(map: Map) {
        if map.JSON["code"] == nil { return nil }
        if map.JSON["data"] == nil { return nil }
    }
    
    func mapping(map: Map) {
        code   <- map["code"]
        data   <- map["data"]
    }
}

class UploadFileDataResponse: NSObject, Mappable {
    var file: File!
    
    required init?(map: Map) {
        if map.JSON["file"] == nil { return nil }
    }
    
    func mapping(map: Map) {
        file    <- map["file"]
    }
}

